﻿<div class="indexheader">
    <div class="header">
        <div class="logo">
            <a href="#">
                <img src="@Url.Content("~/Images/logo.png")" alt="" /></a>
        </div>
        <div class="title">
            <img src="@Url.Content("~/Images/title.png")" alt="" />
        </div>
        <div class="language">
            <ul>
                @Html.Partial("_LogonPartial")
                <li><a href="@Url.Content("~/Home/Index")">
                    <img src="@Url.Content("~/Images/flag_vn.png")" alt="" /></a></li>
                <li><a href="@Url.Content("~/en-US/Home/Index")">
                    <img src="@Url.Content("~/Images/flag_en.png")" alt="" /></a></li>
            </ul>
        </div>
        <div class="followus">
            
            <ul>
                <li><a href="http://facebook.com/pntech.com.vn">
                    <img src="@Url.Content("~/Images/icon-f.png")" alt="" /></a></li>
                <li><a href="#">
                    <img src="@Url.Content("~/Images/icon-t.png")" alt="" /></a></li>
                <li><a href="#">
                    <img src="@Url.Content("~/Images/icon-in.png")" alt="" /></a></li>
            </ul>
            <p style="float:right;">Follow us:</p>
        </div>
        <div class="search">
            <div>
                <input id="searchproducts" type="text" name="search" value="Từ khóa" onfocus="if(this.value == 'Từ khóa') { this.value = ''; }" onblur="if(this.value == '') { this.value = 'Từ khóa'; }" />
                <input id="buttonproducts" type="submit" value="" />
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
        $(document).ready(function() {
            $("a.current").parent().css("background-color", "cornflowerblue");
            
            $("#buttonproducts").click(function() {
                var content = $("#searchproducts").val();
                if (content == '' || content == "Từ khóa") {
                    alert("Vui lòng nhập nội dung ");
                    return false;
                }
                var option = {
                    key: $.trim(content)
                };
                var url = "@(Url.Action("SearchProduct", "Products"))" + "?key=" + content;
                window.location.href = url;
                return false;
            });
        });
    </script>